﻿using ErgoBreak.Data;

namespace ErgoBreak.Core
{
    internal class BreakActionFactory
    {
        #region Fields
        private Settings settings;
        #endregion

        #region Constructors
        public BreakActionFactory(Settings appSettings)
        {
            this.settings = appSettings;
        }
        #endregion

        #region Public Methods
        public IBreakAction CreateAction(Break breakObject)
        {
            IBreakAction action = null;

            switch (settings.BreakAction)
            {
                case BreakActionType.TimedAction:
                    action = new TimedAction(breakObject.ProposedDuration);
                    break;
            }

            return action;
        }
        #endregion
    }
}
